package com.amita.ez.base;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;


@Component
public class AfterBoot implements ApplicationRunner {

    @Autowired
    private YmlConfig ymlConfig;
    @Override
    public void run(ApplicationArguments args) throws Exception {

//        Path path = Paths.get(".").toAbsolutePath().normalize();
        String path = System.getProperty("user.dir");
        System.out.println("path =" + path);
//        Properties properties = System.getProperties();
//        properties.list(System.out);

        System.out.println("server port = " + ymlConfig.getPort());
    }
}
